Starts a song playing AT ONCE - stops whatever was playing first, no fade. Right for a title screen’s very first song (nothing to fade from); see music_fade_to for the crossfade a room-to-room change should use.
music_play(m, loop = true, volume = 1)| Name | Type |
|---|---|
m | song |
loop | bool (can be left out; then it is true) |
volume | real (can be left out; then it is 1) |
Nothing.
Starts a song playing at once - stops whatever was playing first, with no fade. loop (default true) and volume (default 1) can be left out: music_play(song_doc_theme) loops at full volume. Right for the very first song a project ever plays (a title screen has nothing to fade from); for a room-to-room change, music_fade_to is almost always the one you actually want instead, since an abrupt cut between songs reads as a glitch rather than a transition.
music_play(song_doc_theme, true, 1);Starts the theme immediately, looping, at full volume - typically the first music call a project ever makes, from the title screen's own setup.
loop and volume can be left out: music_play(song_theme) is music_play(song_theme, true, 1) - looping, at full volume. To give a volume you also give loop, since the arguments go in order.